import http from '../../util/request.js';
import alert from '../../util/alert.js';
Page({
  data: {
    article: [],
    product: [],
    caselist:[],
    business:[],
    page: 0,
    size: 10,
    hasMore: true
  },
  loadMore: function (e) {
    // console.log(e)
    //   if(!this.data.hasMore) return
    //   this.setData({

    //   })
  },
  scroll: function (e) {
    // console.log(e);
  },
  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
    http.get('api', {r: 'home.Favoritelist',page: this.data.page
    }).then(data => {
      this.setData({ 
        article: data.article,
        product: data.product,
        caselist: data.case,
        business: data.business,
        });
    });
    console.log(this.data.article);



  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    // 页面显示
  },
  onHide: function () {
    // 页面隐藏
  },
  onUnload: function () {
    // 页面关闭
  },
  getScanning: function () {
    app.getScanning()
  }
})
